package com.lz.comm.net

import com.lz.library.proguard.IProguardField

data class HttpResult<T>(var code: Int = 0, var msg: String? = null, var data: T? = null) : IProguardField {

    fun isSuccess() = code == 200 && data != null

    fun success() = code == 200

    fun isNotEmpty(): Boolean = isSuccess() && data is List<*> && (data as List<*>).isNotEmpty()
}